[FSSDK-12026] add customHeaders option to polling config manager#1107
Merged
[FSSDK-12026] add customHeaders option to polling config manager#1107
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for custom HTTP headers in the polling datafile manager configuration. This allows users to pass additional headers that will be included in all datafile fetch requests.
Key Changes:
- Added
customHeadersparameter toPollingConfigManagerConfigandDatafileManagerConfigtypes - Updated
PollingDatafileManagerto merge custom headers with existing headers (Authorization, if-modified-since) - Added comprehensive test coverage for custom headers functionality
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
lib/project_config/polling_datafile_manager.ts |
Added customHeaders property and implementation to merge custom headers into datafile requests |
lib/project_config/polling_datafile_manager.spec.ts |
Added test cases for custom headers functionality including standalone usage and merging with other headers |
lib/project_config/datafile_manager.ts |
Added customHeaders field to DatafileManagerConfig type definition |
lib/project_config/config_manager_factory.ts |
Added customHeaders to PollingConfigManagerConfig type and passed it through to datafile manager |
lib/project_config/config_manager_factory.spec.ts |
Updated tests to verify customHeaders is properly passed through the factory |
lib/project_config/config_manager_factory.react_native.ts |
Updated copyright year and reorganized imports |
lib/project_config/config_manager_factory.react_native.spec.ts |
Updated copyright year and added customHeaders to test configuration |
lib/project_config/config_manager_factory.node.ts |
Updated copyright year and reorganized imports |
lib/project_config/config_manager_factory.node.spec.ts |
Updated copyright year and added customHeaders to test configuration |
lib/project_config/config_manager_factory.browser.ts |
Updated copyright year and reorganized imports |
lib/project_config/config_manager_factory.browser.spec.ts |
Updated copyright year and added customHeaders to test configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
junaed-optimizely
approved these changes
Nov 14, 2025
b66b5ac to
9a6b319
Compare
raju-opti
added a commit
to optimizely/python-sdk
that referenced
this pull request
Feb 5, 2026
…gers This change adds support for custom headers in PollingConfigManager and AuthDatafilePollingConfigManager. Users can now pass custom headers when initializing the SDK client instance, which will be included in HTTP requests to fetch the datafile. Key changes: - Added custom_headers parameter to PollingConfigManager.__init__() - Added custom_headers parameter to AuthDatafilePollingConfigManager (inherited) - Added custom_headers parameter to Optimizely.__init__() and passed to config managers - Updated fetch_datafile() methods to merge custom headers with internal headers - User-provided headers take precedence over SDK internal headers - Added comprehensive test coverage for custom headers functionality Reference: optimizely/javascript-sdk#1107 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues